Psetuid

Section: Oct. 1, 1991 (2)
Updated: MiNT Programmer's Manual
Index Return to Main Contents
 

NAME

Psetuid, Psetgid - change a process' user or group id  

SYNOPSIS

WORD Psetuid(WORD uid);
WORD Psetgid(WORD gid);
 

DESCRIPTION

Psetuid sets the user id of the current process to uid, which must be a number between 0 and 255 inclusive. This function call will fail if the user id is not already 0, so once a process' user id is set it is fixed. Psetuid returns uid, if the call is successful, and EACCDN if the process does not have the authority to change its own user id (i.e. if its effective user id is not 0 at the time of the call).

Similarly, Psetgid sets the group id of the current process to gid, which again must be between 0 and 255. The new group id gid is returned if successful, and EACCDN is returned if permission to change groups is denied.  

SEE ALSO

Pgetuid(2)  

BUGS

Security in MiNT is a joke; don't rely on these calls to actually protect you from anything, it's more for informational purposes.


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
BUGS

This document was created by man2html, using the manual pages.
Time: 16:01:23 GMT, March 03, 2023